var ajaxPath = (window.location + "").split("/")[0] + "//" + (window.location + "").split("/")[2] + "/" + (window.location + "").split("/")[3];
var ftpFlag = true;
var weiboFlag = true;
var weixinFlag = true;
var smsFlag = true;
var ledFlag = true;
var speakerFlag = true;
var appFlag = true;
var tvFlag = true;
var broadcastFlag = true;
var mailFlag = true;
var faxFlag = true;

/**
 * @note 页面初始化加载
 * @author 吴义迪
 * @create_time 2017-08-22
 */
$(function(){
	initCss();
	initVariable();
	eventListen();
	queryFunc_12379wz();
});

/**
 * @note 页面初始化样式
 * @author 吴义迪
 * @create_time 2017-08-23
 */
function initCss(){
	//日期控件皮肤
	laydate.skin('danlan');
}

/**
 * @note 初始化变量
 * @author 吴义迪
 * @create_time 2017-08-23
 */
function initVariable(){
	var date = new Date();
	$("#startime_12379wz").val(date.getFullYear() + "-01-01 00:00:00");
	$("#startime_wb").val(date.getFullYear() + "-01-01 00:00:00");
	$("#startime_12379wx").val(date.getFullYear() + "-01-01 00:00:00");
	$("#startime_yjdx").val(date.getFullYear() + "-01-01 00:00:00");
	$("#startime_dzxsp").val(date.getFullYear() + "-01-01 00:00:00");
	$("#startime_dlb").val(date.getFullYear() + "-01-01 00:00:00");
	$("#startime_sjapp").val(date.getFullYear() + "-01-01 00:00:00");
	$("#startime_yjfb").val(date.getFullYear() + "-01-01 00:00:00");
	$("#startime_dscb").val(date.getFullYear() + "-01-01 00:00:00");
	$("#startime_yjgb").val(date.getFullYear() + "-01-01 00:00:00");
	$("#startime_czfb").val(date.getFullYear() + "-01-01 00:00:00");
}

/**
 * @note 监听事件
 * @author 吴义迪
 * @create_time 2017-08-23
 */
function eventListen(){
	$("#alert_qudao_ul").on("click", qudaoClickFunc);
}

/**
 * @note 展示ftp表格
 * @author 吴义迪
 * @create_time 2017-08-22
 */
function showFTPGrid(ftpValue){
	//初始化表格，后续无需再执行
	if(ftpFlag == true){
		ftpFlag = false;
		$("#gridTable_12379wz").jqGrid({
	        datatype: "local",
	        data: ftpValue,
	        width: $("#gridMainDiv_12379wz").outerWidth(),
	       	loadonce : true,	//表示数据为一次性加载完毕，进行表头排序时需要此属性设为true
	        rownumbers: true,	//表格增加排序列
	        colNames:['预警ID','预警标题','国突报备','12379网站发布','入库时间'],
	        colModel:[
	                    //sortable: true	该表格列可排序
	                    //hidden:true		表格初始化时隐藏改列
	                    {name:'alert_id',index:'alert_id',align:"center"},
	                    {name:'alert_title',index:'alert_title',align:"center"},
	                    {name:'status1',index:'status1',align:"center", formatter:function(value,options,rowData){
	                    	if(value == "0"){
	                    		return "成功";
		                    }else{
		                        return "失败";
		                    }
	                    }
	                    },
	                    {name:'status2',index:'status2',align:"center", formatter:function(value,options,rowData){
	                    	if(value == "0"){
	                    		return "成功";
		                    }else if(value == "-1"){
		                        return "失败";
		                    }else{
		                     	return "等待";
		                    }
	                    }
		                },
	                    {name:'create_time',index:'create_time',align:"center", formatter:function(value,options,rowData){
	                    	var date = new Date(value);
	                    	return timeFormat1(date);
	                    }
	                    }
	                 ],
	        viewrecords:true,
	        styleUI: 'Bootstrap',
	        rowNum: 10,
	        rowList: [10,20,50,100,500,1000],
	        //动态改变表格高度
	        gridComplete: function(){
	        	if($("#gridTable_12379wz").height() < ($(window).height() - $(".nav-tabs").outerHeight() - $("#query_12379wz").outerHeight() - 145)){
	        		$(".ui-jqgrid-bdiv").height($("#gridTable_12379wz").height()+1);
	        	}else{
	        		$(".ui-jqgrid-bdiv").height($(window).height() - $(".nav-tabs").outerHeight() - $("#query_12379wz").outerHeight() - 145);
	        	}
	        },
	        pager:"#gridPager_12379wz",
	        caption: "12379网站发布结果监控",
	        hidegrid : false
	    }).navGrid('#gridPager_12379wz', {
			refresh: true,
			edit: false,
			add: false,
			del: false,
			search: false,
			afterRefresh: queryFunc_12379wz
		});
	}else{
		$("#gridTable_12379wz").jqGrid("clearGridData");
		//重新加载数据
		$("#gridTable_12379wz").setGridParam({
			data: ftpValue
		}).trigger("reloadGrid");
	}
}

/**
 * @note 获取ftp报备监控信息
 * @author 吴义迪
 * @create_time 2017-08-22
 */
function getFTPMonitorInfo(alert_id, start_time, end_time, status1, status2){
	var data = {};
	if(alert_id != null){
		data.alert_id = alert_id;
	}
	if(start_time != null){
		data.start_time = start_time;
	}
	if(end_time != null){
		data.end_time = end_time;
	}
	if(status1 != null){
		data.status1 = status1;
	}
	if(status2 != null){
		data.status2 = status2;
	}
    $.ajax({
		url: ajaxPath + "/sendMonitor/getFTPMonitorInfo.do",
		type: "post",
		data: data,
		dataType: "json",
		//回调函数
		success:function(result){
			if(result.status == 0){
				showFTPGrid(result.data);
			}else{
				showFTPGrid([]);
			}
		}
	});
}

/**
 * @note 12379网站渠道查询
 * @author 吴义迪
 * @create_time 2017-08-23
 */
function queryFunc_12379wz(){
	var alert_id = null;
	var start_time = null;
	var end_time = null;
	var status1 = null;
	var status2 = null;
	if($("#alert_id_12379wz").val() != ""){
		alert_id = $("#alert_id_12379wz").val();
	}
	if($("#startime_12379wz").val() != ""){
		start_time = $("#startime_12379wz").val();
	}
	if($("#endtime_12379wz").val() != ""){
		end_time = $("#endtime_12379wz").val();
	}
	if($("#status1_12379wz>option:selected").val() != ""){
		status1 = $("#status1_12379wz>option:selected").val();
	}
	if($("#status2_12379wz>option:selected").val() != ""){
		status2 = $("#status2_12379wz>option:selected").val();
	}
	getFTPMonitorInfo(alert_id, start_time, end_time, status1, status2);
}

/**
 * @note 微博渠道查询
 * @author 吴义迪
 * @create_time 2017-08-23
 */
function queryFunc_wb(){
	var alert_id = null;
	var start_time = null;
	var end_time = null;
	var status = null;
	var wb_name = null;
	if($("#alert_id_wb").val() != ""){
		alert_id = $("#alert_id_wb").val();
	}
	if($("#startime_wb").val() != ""){
		start_time = $("#startime_wb").val();
	}
	if($("#endtime_wb").val() != ""){
		end_time = $("#endtime_wb").val();
	}
	if($("#status_wb>option:selected").val() != ""){
		status = $("#status_wb>option:selected").val();
	}
	if($("#weibo_name_wb").val() != ""){
		wb_name = $("#weibo_name_wb").val();
	}
	getWeiboMonitorInfo(alert_id, start_time, end_time, status, wb_name);
}

/**
 * @note 获取微博监控信息
 * @author 吴义迪
 * @create_time 2017-08-23
 */
function getWeiboMonitorInfo(alert_id, start_time, end_time, status, wb_name){
	var data = {};
	if(alert_id != null){
		data.alert_id = alert_id;
	}
	if(start_time != null){
		data.start_time = start_time;
	}
	if(end_time != null){
		data.end_time = end_time;
	}
	if(status != null){
		data.status = status;
	}
	if(wb_name != null){
		data.wb_name = wb_name;
	}
    $.ajax({
		url: ajaxPath + "/sendMonitor/getWeiboMonitorInfo.do",
		type: "post",
		data: data,
		dataType: "json",
		//回调函数
		success:function(result){
			if(result.status == 0){
				showWeiboGrid(result.data);
			}else{
				showWeiboGrid([]);
			}
		}
	});
}

/**
 * @note 展示微博表格
 * @author 吴义迪
 * @create_time 2017-08-23
 */
function showWeiboGrid(weiboValue){
	//初始化表格，后续无需再执行
	if(weiboFlag == true){
		weiboFlag = false;
		$("#gridTable_wb").jqGrid({
	        datatype: "local",
	        data: weiboValue,
	        width: $("#gridMainDiv_wb").outerWidth(),
	       	loadonce : true,	//表示数据为一次性加载完毕，进行表头排序时需要此属性设为true
	        rownumbers: true,	//表格增加排序列
	        colNames:['预警ID','预警标题','微博名称','发布状态','入库时间'],
	        colModel:[
	                    //sortable: true	该表格列可排序
	                    //hidden:true		表格初始化时隐藏改列
	                    {name:'alert_id',index:'alert_id',align:"center"},
	                    {name:'alert_title',index:'alert_title',align:"center"},
	                    {name:'wb_name',index:'wb_name',align:"center"},
	                    {name:'status',index:'status',align:"center", formatter:function(value,options,rowData){
	                    	if(value == "0"){
	                    		return "成功";
		                    }else{
		                        return "失败";
		                    }
	                    }
		                },
	                    {name:'create_time',index:'create_time',align:"center", formatter:function(value,options,rowData){
	                    	var date = new Date(value);
	                    	return timeFormat1(date);
	                    }
	                    }
	                 ],
	        viewrecords:true,
	        styleUI: 'Bootstrap',
	        rowNum: 10,
	        rowList: [10,20,50,100,500,1000],
	        //动态改变表格高度
	        gridComplete: function(){
	        	if($("#gridTable_wb").height() < ($(window).height() - $(".nav-tabs").outerHeight() - $("#query_wb").outerHeight() - 145)){
	        		$(".ui-jqgrid-bdiv").height($("#gridTable_wb").height()+1);
	        	}else{
	        		$(".ui-jqgrid-bdiv").height($(window).height() - $(".nav-tabs").outerHeight() - $("#query_wb").outerHeight() - 145);
	        	}
	        },
	        pager:"#gridPager_wb",
	        caption: "微博发布结果监控",
	        hidegrid : false
	    }).navGrid('#gridPager_wb', {
			refresh: true,
			edit: false,
			add: false,
			del: false,
			search: false,
			afterRefresh: queryFunc_wb
		});
	}else{
		$("#gridTable_wb").jqGrid("clearGridData");
		//重新加载数据
		$("#gridTable_wb").setGridParam({
			data: weiboValue
		}).trigger("reloadGrid");
	}
}

/**
 * @note 微信渠道查询
 * @author 吴义迪
 * @create_time 2017-08-23
 */
function queryFunc_12379wx(){
	var alert_id = null;
	var start_time = null;
	var end_time = null;
	var status = null;
	var weixin_id = null;
	if($("#alert_id_12379wx").val() != ""){
		alert_id = $("#alert_id_12379wx").val();
	}
	if($("#startime_12379wx").val() != ""){
		start_time = $("#startime_12379wx").val();
	}
	if($("#endtime_12379wx").val() != ""){
		end_time = $("#endtime_12379wx").val();
	}
	if($("#status_12379wx>option:selected").val() != ""){
		status = $("#status_12379wx>option:selected").val();
	}
	if($("#weixin_id_12379wx").val() != ""){
		weixin_id = $("#weixin_id_12379wx").val();
	}
	getWeixinMonitorInfo(alert_id, start_time, end_time, status, weixin_id);
}

/**
 * @note 获取微信监控信息
 * @author 吴义迪
 * @create_time 2017-08-23
 */
function getWeixinMonitorInfo(alert_id, start_time, end_time, status, weixin_id){
	var data = {};
	if(alert_id != null){
		data.alert_id = alert_id;
	}
	if(start_time != null){
		data.start_time = start_time;
	}
	if(end_time != null){
		data.end_time = end_time;
	}
	if(status != null){
		data.status = status;
	}
	if(weixin_id != null){
		data.weixin_id = weixin_id;
	}
    $.ajax({
		url: ajaxPath + "/sendMonitor/getWeixinMonitorInfo.do",
		type: "post",
		data: data,
		dataType: "json",
		//回调函数
		success:function(result){
			if(result.status == 0){
				showWeixinGrid(result.data);
			}else{
				showWeixinGrid([]);
			}
		}
	});
}

/**
 * @note 展示微信表格
 * @author 吴义迪
 * @create_time 2017-08-23
 */
function showWeixinGrid(weixinValue){
	//初始化表格，后续无需再执行
	if(weixinFlag == true){
		weixinFlag = false;
		$("#gridTable_12379wx").jqGrid({
	        datatype: "local",
	        data: weixinValue,
	        width: $("#gridMainDiv_12379wx").outerWidth(),
	       	loadonce : true,	//表示数据为一次性加载完毕，进行表头排序时需要此属性设为true
	        rownumbers: true,	//表格增加排序列
	        colNames:['预警ID','预警标题','微信号','发布状态','入库时间'],
	        colModel:[
	                    //sortable: true	该表格列可排序
	                    //hidden:true		表格初始化时隐藏改列
	                    {name:'alert_id',index:'alert_id',align:"center"},
	                    {name:'alert_title',index:'alert_title',align:"center"},
	                    {name:'weixin_id',index:'weixin_id',align:"center"},
	                    {name:'status',index:'status',align:"center", formatter:function(value,options,rowData){
	                    	if(value == "0"){
	                    		return "成功";
		                    }else{
		                        return "失败";
		                    }
	                    }
		                },
	                    {name:'create_time',index:'create_time',align:"center", formatter:function(value,options,rowData){
	                    	var date = new Date(value);
	                    	return timeFormat1(date);
	                    }
	                    }
	                 ],
	        viewrecords:true,
	        styleUI: 'Bootstrap',
	        sortname: 'alert_id',
	        //分组
	        grouping:true,
            groupingView : {
              groupField : ['alert_id','status'],
              groupColumnShow : [true],
              groupText : ['{0}&nbsp;&nbsp;&nbsp;&nbsp;应发：{1}','{0}发送 - {1}条'],
              groupCollapse: true,
              groupOrder: ['desc']
            },
	        //动态改变表格高度
	        gridComplete: function(){
	        	$(".ui-jqgrid-bdiv").height($(window).height() - $(".nav-tabs").outerHeight() - $("#query_12379wx").outerHeight() - 145);
	        },
	        pager:"#gridPager_12379wx",
	        caption: "微信发布结果监控",
	        hidegrid : false
	    }).navGrid('#gridPager_12379wx', {
			refresh: true,
			edit: false,
			add: false,
			del: false,
			search: false,
			afterRefresh: queryFunc_12379wx
		});
	}else{
		$("#gridTable_12379wx").jqGrid("clearGridData");
		//重新加载数据
		$("#gridTable_12379wx").setGridParam({
			data: weixinValue
		}).trigger("reloadGrid");
	}
}

/**
 * @note 短信渠道查询
 * @author 吴义迪
 * @create_time 2017-08-26
 */
function queryFunc_yjdx(){
	var alert_id = null;
	var start_time = null;
	var end_time = null;
	var status = null;
	var phoneNum = null;
	var phoneType = null;
	if($("#alert_id_yjdx").val() != ""){
		alert_id = $("#alert_id_yjdx").val();
	}
	if($("#startime_yjdx").val() != ""){
		start_time = $("#startime_yjdx").val();
	}
	if($("#endtime_yjdx").val() != ""){
		end_time = $("#endtime_yjdx").val();
	}
	if($("#status_yjdx>option:selected").val() != ""){
		status = $("#status_yjdx>option:selected").val();
	}
	if($("#phoneNum_yjdx").val() != ""){
		phoneNum = $("#phoneNum_yjdx").val();
	}
	if($("#phoneType_yjdx>option:selected").val() != ""){
		phoneType = $("#phoneType_yjdx>option:selected").val();
	}
	getSMSMonitorInfo(alert_id, start_time, end_time, status, phoneNum, phoneType);
}

/**
 * @note 获取短信监控信息
 * @author 吴义迪
 * @create_time 2017-08-26
 */
function getSMSMonitorInfo(alert_id, start_time, end_time, status, phoneNum, phoneType){
	var data = {};
	if(alert_id != null){
		data.alert_id = alert_id;
	}
	if(start_time != null){
		data.start_time = start_time;
	}
	if(end_time != null){
		data.end_time = end_time;
	}
	if(status != null){
		data.status = status;
	}
	if(phoneNum != null){
		data.phoneNum = phoneNum;
	}
	if(phoneType != null){
		data.phoneType = phoneType;
	}
    $.ajax({
		url: ajaxPath + "/sendMonitor/getSMSMonitorInfo.do",
		type: "post",
		data: data,
		dataType: "json",
		//回调函数
		success:function(result){
			if(result.status == 0){
				showSMSGrid(result.data);
			}else{
				showSMSGrid([]);
			}
		}
	});
}

/**
 * @note 展示短信表格
 * @author 吴义迪
 * @create_time 2017-08-26
 */
function showSMSGrid(smsValue){
	//初始化表格，后续无需再执行
	if(smsFlag == true){
		smsFlag = false;
		$("#gridTable_yjdx").jqGrid({
	        datatype: "local",
	        data: smsValue,
	        width: $("#gridMainDiv_yjdx").outerWidth(),
	       	loadonce : true,	//表示数据为一次性加载完毕，进行表头排序时需要此属性设为true
	        rownumbers: true,	//表格增加排序列
	        colNames:['预警ID','预警标题','手机号码','运营商','发布状态','入库时间'],
	        colModel:[
	                    //sortable: true	该表格列可排序
	                    //hidden:true		表格初始化时隐藏改列
	                    {name:'alert_id',index:'alert_id',align:"center"},
	                    {name:'alert_title',index:'alert_title',align:"center"},
	                    {name:'phoneNum',index:'phoneNum',align:"center"},
	                    {name:'phoneType',index:'phoneType',align:"center", formatter:function(value,options,rowData){
	                    	if(value == "0"){
	                    		return "移动";
		                    }else if(value == "1"){
		                        return "联通";
		                    }else if(value == "2"){
		                        return "电信";
		                    }
	                    }
	                    },
	                    {name:'status',index:'status',align:"center", formatter:function(value,options,rowData){
	                    	if(value == "0"){
	                    		return "成功";
		                    }else{
		                        return "失败";
		                    }
	                    }
		                },
	                    {name:'create_time',index:'create_time',align:"center", formatter:function(value,options,rowData){
	                    	var date = new Date(value);
	                    	return timeFormat1(date);
	                    }
	                    }
	                 ],
	        viewrecords:true,
	        styleUI: 'Bootstrap',
	        //分组
	        grouping:true,
            groupingView : {
              groupField : ['alert_id','status'],
              groupColumnShow : [true],
              groupText : ['{0}&nbsp;&nbsp;&nbsp;&nbsp;应发：{1}','{0}发送 - {1}条'],
              groupCollapse : true,
              groupOrder: ['desc']
            },
	        //动态改变表格高度
	        gridComplete: function(){
	        	$(".ui-jqgrid-bdiv").height($(window).height() - $(".nav-tabs").outerHeight() - $("#query_yjdx").outerHeight() - 145);
	        },
	        pager:"#gridPager_yjdx",
	        caption: "短信发布结果监控",
	        hidegrid : false
	    }).navGrid('#gridPager_yjdx', {
			refresh: true,
			edit: false,
			add: false,
			del: false,
			search: false,
			afterRefresh: queryFunc_yjdx
		});
	}else{
		$("#gridTable_yjdx").jqGrid("clearGridData");
		//重新加载数据
		$("#gridTable_yjdx").setGridParam({
			data: smsValue
		}).trigger("reloadGrid");
	}
}

/**
 * @note 显示屏渠道查询
 * @author 吴义迪
 * @create_time 2017-12-06
 */
function queryFunc_dzxsp(){
	var alert_id = null;
	var start_time = null;
	var end_time = null;
	var status = null;
	var terminal = null;
	var equipment_type = null;
	if($("#alert_id_dzxsp").val() != ""){
		alert_id = $("#alert_id_dzxsp").val();
	}
	if($("#startime_dzxsp").val() != ""){
		start_time = $("#startime_dzxsp").val();
	}
	if($("#endtime_dzxsp").val() != ""){
		end_time = $("#endtime_dzxsp").val();
	}
	if($("#status_dzxsp>option:selected").val() != ""){
		status = $("#status_dzxsp>option:selected").val();
	}
	if($("#terminal_dzxsp").val() != ""){
		terminal = $("#terminal_dzxsp").val();
	}
	if($("#equipment_type_dlb>option:selected").val() != ""){
		equipment_type = $("#equipment_type_dlb>option:selected").val();
	}
	getLedMonitorInfo(alert_id, start_time, end_time, status, terminal, equipment_type);
}

/**
 * @note 获取显示屏监控信息
 * @author 吴义迪
 * @create_time 2017-12-06
 */
function getLedMonitorInfo(alert_id, start_time, end_time, status, terminal, equipment_type){
	var data = {};
	if(alert_id != null){
		data.alert_id = alert_id;
	}
	if(start_time != null){
		data.start_time = start_time;
	}
	if(end_time != null){
		data.end_time = end_time;
	}
	if(status != null){
		data.status = status;
	}
	if(terminal != null){
		data.equipment_id = terminal;
	}
	if(equipment_type != null){
		data.equipment_type = equipment_type;
	}
    $.ajax({
		url: ajaxPath + "/sendMonitor/getLedMonitorInfo.do",
		type: "post",
		data: data,
		dataType: "json",
		//回调函数
		success:function(result){
			if(result.status == 0){
				showLedGrid(result.data);
			}else{
				showLedGrid([]);
			}
		}
	});
}

/**
 * @note 展示显示屏表格
 * @author 吴义迪
 * @create_time 2017-12-06
 */
function showLedGrid(ledValue){
	//初始化表格，后续无需再执行
	if(ledFlag == true){
		ledFlag = false;
		$("#gridTable_dzxsp").jqGrid({
	        datatype: "local",
	        data: ledValue,
	        width: $("#gridMainDiv_dzxsp").outerWidth(),
	       	loadonce : true,	//表示数据为一次性加载完毕，进行表头排序时需要此属性设为true
	        rownumbers: true,	//表格增加排序列
	        colNames:['预警ID','预警标题','发布状态','设备号','设备厂家','入库时间'],
	        colModel:[
	                    //sortable: true	该表格列可排序
	                    //hidden:true		表格初始化时隐藏改列
	                    {name:'alert_id',index:'alert_id',align:"center"},
	                    {name:'alert_title',index:'alert_title',align:"center"},
	                    {name:'status',index:'status',align:"center", formatter:function(value,options,rowData){
	                    	if(value == "0"){
	                    		return "成功";
		                    }else{
		                        return "失败";
		                    }
	                    }
		                },
		                {name:'equipment_id',index:'equipment_id',align:"center"},
		                {name:'equipment_type',index:'equipment_type',align:"center", formatter:function(value,options,rowData){
	                    	if(value == "ssd"){
	                    		return "双顺达";
		                    }
	                    }},
	                    {name:'create_time',index:'create_time',align:"center", formatter:function(value,options,rowData){
	                    	var date = new Date(value);
	                    	return timeFormat1(date);
	                    }
	                    }
	                 ],
	        viewrecords:true,
	        styleUI: 'Bootstrap',
	        //分组
	        grouping:true,
            groupingView : {
              groupField : ['alert_id','status'],
              groupColumnShow : [true],
              groupText : ['{0}&nbsp;&nbsp;&nbsp;&nbsp;应发：{1}','{0}发送 - {1}条'],
              groupCollapse : true,
              groupOrder: ['desc']
            },
	        //动态改变表格高度
	        gridComplete: function(){
	        	$(".ui-jqgrid-bdiv").height($(window).height() - $(".nav-tabs").outerHeight() - $("#query_dzxsp").outerHeight() - 145);
	        },
	        pager:"#gridPager_dzxsp",
	        caption: "显示屏发布结果监控",
	        hidegrid : false
	    }).navGrid('#gridPager_dzxsp', {
			refresh: true,
			edit: false,
			add: false,
			del: false,
			search: false,
			afterRefresh: queryFunc_dzxsp
		});
	}else{
		$("#gridTable_dzxsp").jqGrid("clearGridData");
		//重新加载数据
		$("#gridTable_dzxsp").setGridParam({
			data: ledValue
		}).trigger("reloadGrid");
	}
}

/**
 * @note 大喇叭渠道查询
 * @author 吴义迪
 * @create_time 2017-12-06
 */
function queryFunc_dlb(){
	var alert_id = null;
	var start_time = null;
	var end_time = null;
	var status = null;
	var terminal = null;
	var equipment_type = null;
	if($("#alert_id_dlb").val() != ""){
		alert_id = $("#alert_id_dlb").val();
	}
	if($("#startime_dlb").val() != ""){
		start_time = $("#startime_dlb").val();
	}
	if($("#endtime_dlb").val() != ""){
		end_time = $("#endtime_dlb").val();
	}
	if($("#status_dlb>option:selected").val() != ""){
		status = $("#status_dlb>option:selected").val();
	}
	if($("#terminal_dlb").val() != ""){
		terminal = $("#terminal_dlb").val();
	}
	if($("#equipment_type_dlb>option:selected").val() != ""){
		equipment_type = $("#equipment_type_dlb>option:selected").val();
	}
	getSpeakerMonitorInfo(alert_id, start_time, end_time, status, terminal, equipment_type);
}

/**
 * @note 获取大喇叭监控信息
 * @author 吴义迪
 * @create_time 2017-12-06
 */
function getSpeakerMonitorInfo(alert_id, start_time, end_time, status, terminal, equipment_type){
	var data = {};
	if(alert_id != null){
		data.alert_id = alert_id;
	}
	if(start_time != null){
		data.start_time = start_time;
	}
	if(end_time != null){
		data.end_time = end_time;
	}
	if(status != null){
		data.status = status;
	}
	if(terminal != null){
		data.equipment_id = terminal;
	}
	if(equipment_type != null){
		data.equipment_type = equipment_type;
	}
    $.ajax({
		url: ajaxPath + "/sendMonitor/getSpeakerMonitorInfo.do",
		type: "post",
		data: data,
		dataType: "json",
		//回调函数
		success:function(result){
			if(result.status == 0){
				showSpeakerGrid(result.data);
			}else{
				showSpeakerGrid([]);
			}
		}
	});
}

/**
 * @note 展示大喇叭表格
 * @author 吴义迪
 * @create_time 2017-12-06
 */
function showSpeakerGrid(speakerValue){
	//初始化表格，后续无需再执行
	if(speakerFlag == true){
		speakerFlag = false;
		$("#gridTable_dlb").jqGrid({
	        datatype: "local",
	        data: speakerValue,
	        width: $("#gridMainDiv_dlb").outerWidth(),
	       	loadonce : true,	//表示数据为一次性加载完毕，进行表头排序时需要此属性设为true
	        rownumbers: true,	//表格增加排序列
	        colNames:['预警ID','预警标题','发布状态','设备号','设备厂家','入库时间'],
	        colModel:[
	                    //sortable: true	该表格列可排序
	                    //hidden:true		表格初始化时隐藏改列
	                    {name:'alert_id',index:'alert_id',align:"center"},
	                    {name:'alert_title',index:'alert_title',align:"center"},
	                    {name:'status',index:'status',align:"center", formatter:function(value,options,rowData){
	                    	if(value == "0"){
	                    		return "成功";
		                    }else{
		                        return "失败";
		                    }
	                    }},
		                {name:'equipment_id',index:'equipment_id',align:"center"},
		                {name:'equipment_type',index:'equipment_type',align:"center", formatter:function(value,options,rowData){
	                    	if(value == "ssd"){
	                    		return "双顺达";
		                    }
	                    }},
	                    {name:'create_time',index:'create_time',align:"center", formatter:function(value,options,rowData){
	                    	var date = new Date(value);
	                    	return timeFormat1(date);
	                    }
	                    }
	                 ],
	        viewrecords:true,
	        styleUI: 'Bootstrap',
	        //分组
	        grouping:true,
            groupingView : {
              groupField : ['alert_id','status'],
              groupColumnShow : [true],
              groupText : ['{0}&nbsp;&nbsp;&nbsp;&nbsp;应发：{1}','{0}发送 - {1}条'],
              groupCollapse : true,
              groupOrder: ['desc']
            },
	        //动态改变表格高度
	        gridComplete: function(){
	        	$(".ui-jqgrid-bdiv").height($(window).height() - $(".nav-tabs").outerHeight() - $("#query_dlb").outerHeight() - 145);
	        },
	        pager:"#gridPager_dlb",
	        caption: "大喇叭发布结果监控",
	        hidegrid : false
	    }).navGrid('#gridPager_dlb', {
			refresh: true,
			edit: false,
			add: false,
			del: false,
			search: false,
			afterRefresh: queryFunc_dlb
		});
	}else{
		$("#gridTable_dlb").jqGrid("clearGridData");
		//重新加载数据
		$("#gridTable_dlb").setGridParam({
			data: speakerValue
		}).trigger("reloadGrid");
	}
}

/**
 * @note APP渠道查询
 * @author 吴义迪
 * @create_time 2017-12-07
 */
function queryFunc_sjapp(){
	var alert_id = null;
	var start_time = null;
	var end_time = null;
	var status = null;
	if($("#alert_id_sjapp").val() != ""){
		alert_id = $("#alert_id_sjapp").val();
	}
	if($("#startime_sjapp").val() != ""){
		start_time = $("#startime_sjapp").val();
	}
	if($("#endtime_sjapp").val() != ""){
		end_time = $("#endtime_sjapp").val();
	}
	if($("#status_sjapp>option:selected").val() != ""){
		status = $("#status_sjapp>option:selected").val();
	}
	getAppMonitorInfo(alert_id, start_time, end_time, status);
}

/**
 * @note 获取APP监控信息
 * @author 吴义迪
 * @create_time 2017-12-07
 */
function getAppMonitorInfo(alert_id, start_time, end_time, status){
	var data = {};
	if(alert_id != null){
		data.alert_id = alert_id;
	}
	if(start_time != null){
		data.start_time = start_time;
	}
	if(end_time != null){
		data.end_time = end_time;
	}
	if(status != null){
		data.status = status;
	}
    $.ajax({
		url: ajaxPath + "/sendMonitor/getAppMonitorInfo.do",
		type: "post",
		data: data,
		dataType: "json",
		//回调函数
		success:function(result){
			if(result.status == 0){
				showAppGrid(result.data);
			}else{
				showAppGrid([]);
			}
		}
	});
}

/**
 * @note 展示APP表格
 * @author 吴义迪
 * @create_time 2017-12-07
 */
function showAppGrid(appValue){
	//初始化表格，后续无需再执行
	if(appFlag == true){
		appFlag = false;
		$("#gridTable_sjapp").jqGrid({
	        datatype: "local",
	        data: appValue,
	        width: $("#gridMainDiv_sjapp").outerWidth(),
	       	loadonce : true,	//表示数据为一次性加载完毕，进行表头排序时需要此属性设为true
	        rownumbers: true,	//表格增加排序列
	        colNames:['预警ID','预警标题','发布状态','入库时间'],
	        colModel:[
	                    //sortable: true	该表格列可排序
	                    //hidden:true		表格初始化时隐藏改列
	                    {name:'alert_id',index:'alert_id',align:"center"},
	                    {name:'alert_title',index:'alert_title',align:"center"},
	                    {name:'status',index:'status',align:"center", formatter:function(value,options,rowData){
	                    	if(value == "0"){
	                    		return "成功";
		                    }else{
		                        return "失败";
		                    }
	                    }},
	                    {name:'create_time',index:'create_time',align:"center", formatter:function(value,options,rowData){
	                    	var date = new Date(value);
	                    	return timeFormat1(date);
	                    }
	                    }
	                 ],
            viewrecords:true,
 	        styleUI: 'Bootstrap',
 	        rowNum: 10,
 	        rowList: [10,20,50,100,500,1000],
	        //动态改变表格高度
	        gridComplete: function(){
	        	if($("#gridTable_sjapp").height() < ($(window).height() - $(".nav-tabs").outerHeight() - $("#query_sjapp").outerHeight() - 145)){
	        		$(".ui-jqgrid-bdiv").height($("#gridTable_sjapp").height()+1);
	        	}else{
	        		$(".ui-jqgrid-bdiv").height($(window).height() - $(".nav-tabs").outerHeight() - $("#query_sjapp").outerHeight() - 145);
	        	}
	        },
	        pager:"#gridPager_sjapp",
	        caption: "手机APP发布结果监控",
	        hidegrid : false
	    }).navGrid('#gridPager_sjapp', {
			refresh: true,
			edit: false,
			add: false,
			del: false,
			search: false,
			afterRefresh: queryFunc_sjapp
		});
	}else{
		$("#gridTable_sjapp").jqGrid("clearGridData");
		//重新加载数据
		$("#gridTable_sjapp").setGridParam({
			data: appValue
		}).trigger("reloadGrid");
	}
}

/**
 * @note TV渠道查询
 * @author 吴义迪
 * @create_time 2017-12-07
 */
function queryFunc_dscb(){
	var alert_id = null;
	var start_time = null;
	var end_time = null;
	var status = null;
	if($("#alert_id_dscb").val() != ""){
		alert_id = $("#alert_id_dscb").val();
	}
	if($("#startime_dscb").val() != ""){
		start_time = $("#startime_dscb").val();
	}
	if($("#endtime_dscb").val() != ""){
		end_time = $("#endtime_dscb").val();
	}
	if($("#status_dscb>option:selected").val() != ""){
		status = $("#status_dscb>option:selected").val();
	}
	getTvMonitorInfo(alert_id, start_time, end_time, status);
}

/**
 * @note 获取TV监控信息
 * @author 吴义迪
 * @create_time 2017-12-07
 */
function getTvMonitorInfo(alert_id, start_time, end_time, status){
	var data = {};
	if(alert_id != null){
		data.alert_id = alert_id;
	}
	if(start_time != null){
		data.start_time = start_time;
	}
	if(end_time != null){
		data.end_time = end_time;
	}
	if(status != null){
		data.status = status;
	}
    $.ajax({
		url: ajaxPath + "/sendMonitor/getTvMonitorInfo.do",
		type: "post",
		data: data,
		dataType: "json",
		//回调函数
		success:function(result){
			if(result.status == 0){
				showTvGrid(result.data);
			}else{
				showTvGrid([]);
			}
		}
	});
}

/**
 * @note 展示TV表格
 * @author 吴义迪
 * @create_time 2017-12-07
 */
function showTvGrid(tvValue){
	//初始化表格，后续无需再执行
	if(tvFlag == true){
		tvFlag = false;
		$("#gridTable_dscb").jqGrid({
	        datatype: "local",
	        data: tvValue,
	        width: $("#gridMainDiv_dscb").outerWidth(),
	       	loadonce : true,	//表示数据为一次性加载完毕，进行表头排序时需要此属性设为true
	        rownumbers: true,	//表格增加排序列
	        colNames:['预警ID','预警标题','发布状态','入库时间'],
	        colModel:[
	                    //sortable: true	该表格列可排序
	                    //hidden:true		表格初始化时隐藏改列
	                    {name:'alert_id',index:'alert_id',align:"center"},
	                    {name:'alert_title',index:'alert_title',align:"center"},
	                    {name:'status',index:'status',align:"center", formatter:function(value,options,rowData){
	                    	if(value == "0"){
	                    		return "成功";
		                    }else{
		                        return "失败";
		                    }
	                    }},
	                    {name:'create_time',index:'create_time',align:"center", formatter:function(value,options,rowData){
	                    	var date = new Date(value);
	                    	return timeFormat1(date);
	                    }
	                    }
	                 ],
            viewrecords:true,
 	        styleUI: 'Bootstrap',
 	        rowNum: 10,
 	        rowList: [10,20,50,100,500,1000],
	        //动态改变表格高度
	        gridComplete: function(){
	        	if($("#gridTable_dscb").height() < ($(window).height() - $(".nav-tabs").outerHeight() - $("#query_dscb").outerHeight() - 145)){
	        		$(".ui-jqgrid-bdiv").height($("#gridTable_dscb").height()+1);
	        	}else{
	        		$(".ui-jqgrid-bdiv").height($(window).height() - $(".nav-tabs").outerHeight() - $("#query_dscb").outerHeight() - 145);
	        	}
	        },
	        pager:"#gridPager_dscb",
	        caption: "电视发布结果监控",
	        hidegrid : false
	    }).navGrid('#gridPager_dscb', {
			refresh: true,
			edit: false,
			add: false,
			del: false,
			search: false,
			afterRefresh: queryFunc_dscb
		});
	}else{
		$("#gridTable_dscb").jqGrid("clearGridData");
		//重新加载数据
		$("#gridTable_dscb").setGridParam({
			data: tvValue
		}).trigger("reloadGrid");
	}
}

/**
 * @note 广播渠道查询
 * @author 吴义迪
 * @create_time 2017-12-07
 */
function queryFunc_yjgb(){
	var alert_id = null;
	var start_time = null;
	var end_time = null;
	var status = null;
	if($("#alert_id_yjgb").val() != ""){
		alert_id = $("#alert_id_yjgb").val();
	}
	if($("#startime_yjgb").val() != ""){
		start_time = $("#startime_yjgb").val();
	}
	if($("#endtime_yjgb").val() != ""){
		end_time = $("#endtime_yjgb").val();
	}
	if($("#status_yjgb>option:selected").val() != ""){
		status = $("#status_yjgb>option:selected").val();
	}
	getBroadcastMonitorInfo(alert_id, start_time, end_time, status);
}

/**
 * @note 获取广播监控信息
 * @author 吴义迪
 * @create_time 2017-12-07
 */
function getBroadcastMonitorInfo(alert_id, start_time, end_time, status){
	var data = {};
	if(alert_id != null){
		data.alert_id = alert_id;
	}
	if(start_time != null){
		data.start_time = start_time;
	}
	if(end_time != null){
		data.end_time = end_time;
	}
	if(status != null){
		data.status = status;
	}
    $.ajax({
		url: ajaxPath + "/sendMonitor/getBroadcastMonitorInfo.do",
		type: "post",
		data: data,
		dataType: "json",
		//回调函数
		success:function(result){
			if(result.status == 0){
				showBroadcastGrid(result.data);
			}else{
				showBroadcastGrid([]);
			}
		}
	});
}

/**
 * @note 展示广播表格
 * @author 吴义迪
 * @create_time 2017-12-07
 */
function showBroadcastGrid(broadcastValue){
	//初始化表格，后续无需再执行
	if(broadcastFlag == true){
		broadcastFlag = false;
		$("#gridTable_yjgb").jqGrid({
	        datatype: "local",
	        data: broadcastValue,
	        width: $("#gridMainDiv_yjgb").outerWidth(),
	       	loadonce : true,	//表示数据为一次性加载完毕，进行表头排序时需要此属性设为true
	        rownumbers: true,	//表格增加排序列
	        colNames:['预警ID','预警标题','发布状态','入库时间'],
	        colModel:[
	                    //sortable: true	该表格列可排序
	                    //hidden:true		表格初始化时隐藏改列
	                    {name:'alert_id',index:'alert_id',align:"center"},
	                    {name:'alert_title',index:'alert_title',align:"center"},
	                    {name:'status',index:'status',align:"center", formatter:function(value,options,rowData){
	                    	if(value == "0"){
	                    		return "成功";
		                    }else{
		                        return "失败";
		                    }
	                    }},
	                    {name:'create_time',index:'create_time',align:"center", formatter:function(value,options,rowData){
	                    	var date = new Date(value);
	                    	return timeFormat1(date);
	                    }
	                    }
	                 ],
            viewrecords:true,
 	        styleUI: 'Bootstrap',
 	        rowNum: 10,
 	        rowList: [10,20,50,100,500,1000],
	        //动态改变表格高度
	        gridComplete: function(){
	        	if($("#gridTable_yjgb").height() < ($(window).height() - $(".nav-tabs").outerHeight() - $("#query_yjgb").outerHeight() - 145)){
	        		$(".ui-jqgrid-bdiv").height($("#gridTable_yjgb").height()+1);
	        	}else{
	        		$(".ui-jqgrid-bdiv").height($(window).height() - $(".nav-tabs").outerHeight() - $("#query_yjgb").outerHeight() - 145);
	        	}
	        },
	        pager:"#gridPager_yjgb",
	        caption: "广播发布结果监控",
	        hidegrid : false
	    }).navGrid('#gridPager_yjgb', {
			refresh: true,
			edit: false,
			add: false,
			del: false,
			search: false,
			afterRefresh: queryFunc_yjgb
		});
	}else{
		$("#gridTable_yjgb").jqGrid("clearGridData");
		//重新加载数据
		$("#gridTable_yjgb").setGridParam({
			data: broadcastValue
		}).trigger("reloadGrid");
	}
}

/**
 * @note 邮件渠道查询
 * @author 吴义迪
 * @create_time 2017-12-07
 */
function queryFunc_yjfb(){
	var alert_id = null;
	var start_time = null;
	var end_time = null;
	var status = null;
	var mail_id = null;
	if($("#alert_id_yjfb").val() != ""){
		alert_id = $("#alert_id_yjfb").val();
	}
	if($("#startime_yjfb").val() != ""){
		start_time = $("#startime_yjfb").val();
	}
	if($("#endtime_yjfb").val() != ""){
		end_time = $("#endtime_yjfb").val();
	}
	if($("#status_yjfb>option:selected").val() != ""){
		status = $("#status_yjfb>option:selected").val();
	}
	if($("#mail_id_yjfb").val() != ""){
		mail_id = $("#mail_id_yjfb").val();
	}
	getMailMonitorInfo(alert_id, start_time, end_time, status, mail_id);
}

/**
 * @note 获取邮件监控信息
 * @author 吴义迪
 * @create_time 2017-12-06
 */
function getMailMonitorInfo(alert_id, start_time, end_time, status, mail_id){
	var data = {};
	if(alert_id != null){
		data.alert_id = alert_id;
	}
	if(start_time != null){
		data.start_time = start_time;
	}
	if(end_time != null){
		data.end_time = end_time;
	}
	if(status != null){
		data.status = status;
	}
	if(mail_id != null){
		data.mail_id = terminal;
	}
    $.ajax({
		url: ajaxPath + "/sendMonitor/getMailMonitorInfo.do",
		type: "post",
		data: data,
		dataType: "json",
		//回调函数
		success:function(result){
			if(result.status == 0){
				showMailGrid(result.data);
			}else{
				showMailGrid([]);
			}
		}
	});
}

/**
 * @note 展示邮件表格
 * @author 吴义迪
 * @create_time 2017-12-06
 */
function showMailGrid(mailValue){
	//初始化表格，后续无需再执行
	if(mailFlag == true){
		mailFlag = false;
		$("#gridTable_yjfb").jqGrid({
	        datatype: "local",
	        data: mailValue,
	        width: $("#gridMainDiv_yjfb").outerWidth(),
	       	loadonce : true,	//表示数据为一次性加载完毕，进行表头排序时需要此属性设为true
	        rownumbers: true,	//表格增加排序列
	        colNames:['预警ID','预警标题','发布状态','入库时间'],
	        colModel:[
	                    //sortable: true	该表格列可排序
	                    //hidden:true		表格初始化时隐藏改列
	                    {name:'alert_id',index:'alert_id',align:"center"},
	                    {name:'alert_title',index:'alert_title',align:"center"},
	                    {name:'status',index:'status',align:"center", formatter:function(value,options,rowData){
	                    	if(value == "0"){
	                    		return "成功";
		                    }else{
		                        return "失败";
		                    }
	                    }},
	                    {name:'create_time',index:'create_time',align:"center", formatter:function(value,options,rowData){
	                    	var date = new Date(value);
	                    	return timeFormat1(date);
	                    }
	                    }
	                 ],
	        viewrecords:true,
	        styleUI: 'Bootstrap',
	        //分组
	        grouping:true,
            groupingView : {
              groupField : ['alert_id','status'],
              groupColumnShow : [true],
              groupText : ['{0}&nbsp;&nbsp;&nbsp;&nbsp;应发：{1}','{0}发送 - {1}条'],
              groupCollapse : true,
              groupOrder: ['desc']
            },
	        //动态改变表格高度
	        gridComplete: function(){
	        	$(".ui-jqgrid-bdiv").height($(window).height() - $(".nav-tabs").outerHeight() - $("#query_yjfb").outerHeight() - 145);
	        },
	        pager:"#gridPager_yjfb",
	        caption: "邮件发布结果监控",
	        hidegrid : false
	    }).navGrid('#gridPager_yjfb', {
			refresh: true,
			edit: false,
			add: false,
			del: false,
			search: false,
			afterRefresh: queryFunc_yjfb
		});
	}else{
		$("#gridTable_yjfb").jqGrid("clearGridData");
		//重新加载数据
		$("#gridTable_yjfb").setGridParam({
			data: mailValue
		}).trigger("reloadGrid");
	}
}

/**
 * @note 传真渠道查询
 * @author 吴义迪
 * @create_time 2017-12-07
 */
function queryFunc_czfb(){
	var alert_id = null;
	var start_time = null;
	var end_time = null;
	var status = null;
	var fax_id = null;
	var ldc = null;
	if($("#alert_id_czfb").val() != ""){
		alert_id = $("#alert_id_czfb").val();
	}
	if($("#startime_czfb").val() != ""){
		start_time = $("#startime_czfb").val();
		start_time = start_time.substring(0,4) + start_time.substring(5,7) + start_time.substring(8,10) + start_time.substring(11,13) + start_time.substring(14,16) + start_time.substring(17,19);
	}
	if($("#endtime_czfb").val() != ""){
		end_time = $("#endtime_czfb").val();
		end_time = end_time.substring(0,4) + end_time.substring(5,7) + end_time.substring(8,10) + end_time.substring(11,13) + end_time.substring(14,16) + end_time.substring(17,19);
	}
	if($("#status_czfb>option:selected").val() != ""){
		status = $("#status_czfb>option:selected").val();
	}
	if($("#fax_id_czfb").val() != ""){
		fax_id = $("#fax_id_czfb").val();
	}
	if($("#ldc_czfb").val() != ""){
		ldc = $("#ldc_czfb").val();
	}
	if(isNaN($("#ldc_czfb").val()) == true){
		alert("区号填写错误");
		return;
	}
	getFaxMonitorInfo(alert_id, start_time, end_time, status, fax_id, ldc);
}

/**
 * @note 获取传真监控信息
 * @author 吴义迪
 * @create_time 2017-12-06
 */
function getFaxMonitorInfo(alert_id, start_time, end_time, status, fax_id, ldc){
	var data = {};
	if(alert_id != null){
		data.alert_id = alert_id;
	}
	if(start_time != null){
		data.start_time = start_time;
	}
	if(end_time != null){
		data.end_time = end_time;
	}
	if(status != null){
		data.status = status;
	}
	if(fax_id != null){
		data.fax_id = fax_id;
	}
	if(ldc != null){
		data.ldc = ldc;
	}
    $.ajax({
		url: ajaxPath + "/sendMonitor/getFaxMonitorInfo.do",
		type: "post",
		data: data,
		dataType: "json",
		//回调函数
		success:function(result){
			if(result.status == 0){
				showFaxGrid(result.data);
			}else{
				showFaxGrid([]);
			}
		}
	});
}

/**
 * @note 展示传真表格
 * @author 吴义迪
 * @create_time 2017-12-06
 */
function showFaxGrid(faxValue){
	//初始化表格，后续无需再执行
	if(faxFlag == true){
		faxFlag = false;
		$("#gridTable_czfb").jqGrid({
	        datatype: "local",
	        data: faxValue,
	        width: $("#gridMainDiv_czfb").outerWidth(),
	       	loadonce : true,	//表示数据为一次性加载完毕，进行表头排序时需要此属性设为true
	        rownumbers: true,	//表格增加排序列
	        colNames:['预警ID','预警标题',"区号","传真号",'发布状态','预警发布时间'],
	        colModel:[
	                    //sortable: true	该表格列可排序
	                    //hidden:true		表格初始化时隐藏改列
	                    {name:'alert_id',index:'alert_id',align:"center"},
	                    {name:'alert_title',index:'alert_title',align:"center"},
	                    {name:'ldc',index:'ldc',align:"center"},
	                    {name:'fax',index:'fax',align:"center"},
	                    {name:'status',index:'status',align:"center", formatter:function(value,options,rowData){
	                    	if(value == "0"){
	                    		return "等待转换";
		                    }else if(value == "1"){
		                        return "转换成功并排队发送";
		                    }else if(value == "2"){
		                        return "发送成功";
		                    }else{
		                        return "发送失败";
		                    }
	                    }},
	                    {name:'create_time',index:'create_time',align:"center", formatter:function(value,options,rowData){
	                    	return value.substring(0,4) + "-" + value.substring(4,6) + "-" + value.substring(6,8) + " " + 
	                    	value.substring(8,10) + ":" + value.substring(10,12) + ":" + value.substring(12,14);
	                    }
	                    }
	                 ],
	        viewrecords:true,
	        styleUI: 'Bootstrap',
	        //分组
	        grouping:true,
            groupingView : {
              groupField : ['alert_id','status'],
              groupColumnShow : [true],
              groupText : ['{0}&nbsp;&nbsp;&nbsp;&nbsp;应发：{1}','{0}发送 - {1}条'],
              groupCollapse : true,
              groupOrder: ['desc']
            },
	        //动态改变表格高度
	        gridComplete: function(){
	        	$(".ui-jqgrid-bdiv").height($(window).height() - $(".nav-tabs").outerHeight() - $("#query_czfb").outerHeight() - 145);
	        },
	        pager:"#gridPager_czfb",
	        caption: "传真发布结果监控",
	        hidegrid : false
	    }).navGrid('#gridPager_czfb', {
			refresh: true,
			edit: false,
			add: false,
			del: false,
			search: false,
			afterRefresh: queryFunc_czfb
		});
	}else{
		$("#gridTable_czfb").jqGrid("clearGridData");
		//重新加载数据
		$("#gridTable_czfb").setGridParam({
			data: faxValue
		}).trigger("reloadGrid");
	}
}


/**
 * @note 渠道切换监听事件
 * @author 吴义迪
 * @create_time 2017-08-23
 */
function qudaoClickFunc(e){
	e = e || window.event;
	if(e.target.attributes["aria-controls"].nodeValue == "12379wz"){
		queryFunc_12379wz();
	}else if(e.target.attributes["aria-controls"].nodeValue == "wb"){
		queryFunc_wb();
	}else if(e.target.attributes["aria-controls"].nodeValue == "12379wx"){
		queryFunc_12379wx();
	}else if(e.target.attributes["aria-controls"].nodeValue == "yjdx"){
		queryFunc_yjdx();
	}else if($(e.target).attr("aria-controls") == "dzxsp"){
		queryFunc_dzxsp();
	}else if($(e.target).attr("aria-controls") == "dlb"){
		queryFunc_dlb();
	}else if($(e.target).attr("aria-controls") == "sjapp"){
		queryFunc_sjapp();
	}else if($(e.target).attr("aria-controls") == "dscb"){
		queryFunc_dscb();
	}else if($(e.target).attr("aria-controls") == "yjgb"){
		queryFunc_yjgb();
	}else if($(e.target).attr("aria-controls") == "yjfb"){
		queryFunc_yjfb();
	}else if($(e.target).attr("aria-controls") == "czfb"){
		queryFunc_czfb();
	}
}